package com.kingschan.jeasytag.sql.sqlparse;

import java.util.List;
/**
 * select 抽象解析
 * select 分两种 
 * 1：普通select
 * 2.union语句
 * @author kingschan
 * date:2013-7-18
 *
 */
public interface  AbstructSelectParse {
	/**
	 * 设置查询的列
	 * @param lis
	 */
	  void setSelectItem(List<String> lis)throws Exception;
	/**
	 * 添加where 条件
	 * @param lis
	 */
	  void appendWhere(String where_str)throws Exception;
	 /**
	  * 设置分页
	  * @param pageindex
	  * @param pagesize
	  * @throws Exception
	  */
	  void paginationLimit(int pageindex, int pagesize) throws Exception;
	 
	 /**
	  * 设置排序
	  * @param lis
	  */
	 abstract void setOrderby(List<String> lis)throws Exception;
	 /**
	  * 设置分组
	  * @param groupby
	  */
	  void setGroupby(List<String> groupby)throws Exception;
	 
	 /**
	  * 设置having
	  * @param having
	  * @throws Exception
	  */
	  void setHaving(String having)throws Exception;
	 
	 /**
	  * 设置sqlserver 数据库的显示条件
	  * @param rowCount
	  * @throws Exception
	  */
	  void setTop(long rowCount)throws Exception;
	 
	 /**
	  * 设置mysql的limit
	  * @param rowCount
	  * @throws Exception
	  */
	  void setLimit(long offset,long rowCount)throws Exception;
	 
	 
}
